package edu.mcw.rgd.clinminer.web.ui;

import com.vaadin.ui.Table;

import com.vaadin.spring.roo.addon.annotations.RooVaadinEntityView;

import edu.mcw.rgd.clinminer.web.AbstractEntityView;
import edu.mcw.rgd.clinminer.web.EntityEditor;

@RooVaadinEntityView(formBackingObject = edu.mcw.rgd.clinminer.domain.Study.class)
public class StudyView extends AbstractEntityView<edu.mcw.rgd.clinminer.domain.Study> {

    @Override
    protected EntityEditor createForm() {
        return new StudyForm();
    }

    @Override
    protected void configureTable(Table table) {
        table.setContainerDataSource(getTableContainer());
        table.setVisibleColumns(getTableColumns());

        setupGeneratedColumns(table);
    }

	@Override
	public Object[] getTableColumns() {
		String[] props = new String[] { "name", "description", "participants" };
		return props;
	}
}
